import { CheckEnvComponent } from './../checkEnv/checkEnv.component';
import { NavController, NavParams } from 'ionic-angular';
import { ActivatedRoute } from '@angular/router';
import { MdSnackBar } from "@angular/material";
import { MessageBoxService, GrowlMessageType } from './../../component/messageBoxService';
import { QueueManager } from './../../common/queueManager';
import { NavigateService } from './../../service/navigate.service';
import { SystemService } from './../../service/system.service';
import { Component, OnInit, OnDestroy } from '@angular/core';

@Component({
    //moduleId: module.id,
    selector: 'div[serchLDC]',
    templateUrl: './searchLDC.component.html',
    styleUrls: ['./searchLDC.component.scss']
})
export class SearchLDCComponent {
    constructor(
        private router: NavigateService,
        private acRouter: ActivatedRoute,
        private navParams: NavParams,
        public navCtrl: NavController
    ) { }
    searchMode: string = "auto";
    private sub;
    ngOnInit() {
        // this.sub = this.acRouter.params.subscribe((params) => {
        //     this.searchMode = params['searchMode'];
        // });
        let mode = this.navParams.get("searchMode");
        this.searchMode = mode;
    }
    searchSuccess($event) {
        // this.router.navigate(["checkEnv"]);
        this.navCtrl.setRoot(CheckEnvComponent);
    }
}